import 'package:flutter/material.dart';
import 'package:palmf_hid/common/values/values.dart';

/// 扁平圆角按钮
Widget commonIconButtonWidget({
  required GestureTapCallback onPressed,
  double? height,
  IconData? icon,
  Color? color = MyColor.c_FFFFFFFF,
  String btnText = "确定",
}) {
  return Container(
    padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
    decoration: BoxDecoration(
      color: color,
      borderRadius: const BorderRadius.all(Radius.circular(5)),
    ),
    height: height,
    child: InkWell(
      onTap: () {
        onPressed();
      },
      child: Row(
        children: [
           Icon(
             icon,
            size: 10,
            color: MyColor.c_FFFFFFFF,
          ),
          const SizedBox(width: 3,),
          Text(
            btnText,
            style: const TextStyle(color: MyColor.c_FFFFFFFF, fontSize: 12),
          ),

        ],
      ),
    ),
  );
}
